home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / sviluppo / svilupp2 / mgnfcl39.rdm < prev    next >
Text File  |  1997-01-18  |  10KB  |  216 lines

  1. Short:    Picture magnifying class for BGUI including source code
  2. Author:   Reinhard Katzmann (suamor@student.uni-tuebingen.de)
  3. Uploader: Reinhard Katzmann (suamor@student.uni-tuebingen.de)
  4. Type:     dev/gui
  5. Replaces: dev/gui/MagnifyClass.lha
  6.  
  7. Small Bugfixes:
  8. - TestMagnify demos now also run on a 640x256 screen (instead only on >640x400)
  9. - RESTRACK option disabled for link & shared library
  10.  
  11.                   MagnifyClass Version 39.2
  12.                   -------------------------
  13.  
  14. MagnifyClass is (C) 1995/96 by Reinhard Katzmann and FREEWARE. All Rights reserved.
  15.  
  16. Introduction
  17. ------------
  18.  
  19. Old users: Read the Changes section! Warning: You _must_ replace the old
  20. magnify_bgui.gadget before using the shared lib demo or your system may crash!
  21.  
  22. This is the second release of Magnifyclass, a picture sizing (or magnify-
  23. ing) class for BGUI. I've included a test program (testmagnifyclass) for
  24. playing around. For closer information read magnifyclass.doc.
  25.  
  26. If you don't know what the hell BGUI is, read the BGUI.intro text file :-)
  27.  
  28. The usage of the class is similar to paletteclass or popbuttonclass which came
  29. both with BGUI12. The class was written with SAS/C6.56 but should work fine
  30. with other compilers, too. Please tell mel if you have any problems compiling
  31. the class. If you have compiled the class, simply link it with your program
  32. using the class. SAS/C-User may not forget to set the NOSTACKCHECK Option!!
  33. (This should belong to th BGUI-FAQ ;-)
  34.  
  35. Copyright & Disclaimer
  36. ----------------------
  37.  
  38. MagnifyClass is (C) 1995/96 by Reinhard Katzmann. All Rights reserved.
  39. MagnifyClass is FREEWARE, i.e. you must not pay me anything using it with
  40. Public Domain, Freeware, Shareware and Giftware programs. Usage in commercial
  41. programs is NOT allowed without the written permission from me! It may and
  42. should be distributed on the BGUI Home Page and to the BGUI ftp server(s).
  43.  
  44. Ian J. Einman has the exclusive right to add the (hopefully) bug-free version
  45. with the coming BGUI release(s).
  46.  
  47. Distribution
  48. ------------
  49.  
  50. You may distribute this class freely as long as you don't charge any money for
  51. it. It may not be uploaded on any BBS which claim copyright on uploaded
  52. material. It may be only distributed as long as no profit is made out of it.
  53. If you want to distribute this archive on a magazine coverdisk you must send
  54. me a complimentery copy of the magazine issue in which it appears to my home
  55. address (see Cnntacting below). It may be freely included in PD Series or CD
  56. ROMs like the Aminet/Fresh Fish CD or Times series.
  57.  
  58. Changes
  59. -------
  60.  
  61. V39.2
  62.  
  63. - Completely compiled with SAS/C 6.57
  64. - MAGNIFY_GrapWidth/Height values are no longer width and height of the object
  65.   but the size of the picture and they are no longer settable in initilisation
  66. - Consequently  the object is no longer forced to use MAGNIFY_GrapWidth/Height
  67.   as minimum dimensions.
  68. - You can instead use MAGNIFY_ScaleWidth/Height to specify which percentage of
  69.   the picture you always want to view (only for startup)
  70. - Use MAGNIFY_BoxWidth/Height to be notified when the size of the window and
  71.   thus the size of the magnify object changes.
  72. - Object size does not need to ne fixed any longer. Removed many problems with
  73.   setting (left mouse button) and rendering to make this possible
  74. - Grid was drawn one pixel to large (both width & height)
  75. - RenderBitMap() used a wrong reference to the RastPort
  76.  
  77. Usage
  78. -----
  79.  
  80. You need to have installed bgui.library V39 or better. Also the demo program
  81. uses iff.library for loading iff images. 
  82.  
  83. There exist two (or three) possibilities to use it. Either you use it as
  84. external gadget class (this is important if you don't program in C/C++
  85. and you can not include SAS/C link libs in your code) or as an SAS/C
  86. (Dice/GCC ?) Link Library. You also can simply compile it and include
  87. the resulting object file. Warning: I did not create an option in the
  88. smakefile for DATA=FAR (i.e. tell the compiler to use 32 bit-references
  89. instead of 16bit). But I don't think it's difficult for you to add it,
  90. in case you need it in your application.
  91.  
  92. I would not use it as external (shared library) gadget class because the
  93. size of gadget class + app is ~10k bigger than using it with link lib. It
  94. would only be useful if many apps are using it or if the language you are
  95. programming is unable to understand SAS/C object code or any other you may
  96. generate (like with the free version of DICE or with gcc).
  97.  
  98. Warning: I did not test it under V37. This mainly concerns the Alloc/Free
  99. functions of the bitmaps.
  100.  
  101. Source Code:
  102. ------------
  103.  
  104. The source code is provided to compile and to link with your program. It may
  105. not be changed or altered in any way! If you have ideas for improving it
  106. somehow please send them to me and I then will consider implementing them
  107. (of course I keep the last word). In no case you may make a new magnifying
  108. class out of this source. But you are allowed to make a new class out of it
  109. that has really other aims than this class. This new class must be distributed
  110. under the same condition as the using (i.e. it may NOT be sold commercial!).
  111. If you decide to do so you must state in your documentation the line:
  112. "This class is based on MagnifyClass (c) 1995/96 Reinhard Katzmann"
  113. (as I have stated in my source code on which it is based).
  114.  
  115. If there are any problems with Dice/GCC compiler building a link library you
  116. should try to solve it (I don't own/use either) and send me diffs so I my be
  117. able to include them in a new release. Please use #ifdef _GCC or similar to
  118. indicate the changes.
  119.  
  120. Resource Tracking: If you turn it on, you will notice that the executables
  121. nearly double in size. I decided to not distribute such a Version.
  122.  
  123. Disclaimer
  124. ----------
  125.  
  126. This program is provided "as is" without warranty of any kind, either
  127. expressed or implied, including, but not limited to, the implied
  128. warranties of merchantability and fitness for a particular purpose.
  129. The entire risk as to the quality and the performance of this collection
  130. is with you. In no event can I be liable to you for damages of any kind
  131. arising out of the use of this program or any part of it's archive, or the
  132. inability to use it.
  133.  
  134. Known Bugs
  135. ----------
  136.  
  137. I have problems with allocating the correct size of the temporary bitmap.
  138. Currently I use ( Magfactor + Grid (if present) ) multiplied by the size of
  139. the part of the image which is to be shown plus (and this is what I find
  140. very strange) the Start point of the image. If I do omit the last I get
  141. Mungwall/Enforcer Hits (i.e. it goes beyond the size of the allocated bitmap).
  142. I can't explain why this happens because the size of the partly shown
  143. image must still be the same.
  144. This is also a prove to me that ScalerDiv() must be wrong, because if it
  145. was true, the above problem may not appear.
  146.  
  147. At startup only a black rectangle is drawn in the window frame (In BGUI 41.7
  148. it is drawn in the object itself). This happens since V39.2 but I could not
  149. figure out which change could have caused it. A refresh solves the problem.
  150.  
  151. The demo does loading/saving of pictures using iff.library which is based on
  152. V37, so uses RGB4 colortables instead of RGB32. This may lead to difficulties.
  153. I'd like to have load/save functions which work on both V37 and V39 (+ GFX
  154. boards as I have a Picasso II, but not dependant on WB-Emu Software if
  155. possible). If you can help me with that or have a function/link lib supporting
  156. loading and saving in an OS-legal way on both V37 and V39 and want to share
  157. it, let me know about it.
  158.  
  159. Future:
  160. -------
  161.  
  162. This is the last release which supports Version 39 of BGUI. The next version
  163. will require V41.7. Therefore this archive is called MagnifyClass39.lha. This
  164. version will be still maintained (bugs etc.) until the new BGUI 2.0 release.
  165. Also I will drop the link library support in the next Version as it is only
  166. useful for 68k SAS/C Users. In effect you won't notice any difference. Using
  167. the shared library will be much easier (as will all BGUI external libraries).
  168.  
  169. As BGUI V41 supports allocating of Bitmaps for both V37 and V39, I will use
  170. these functions in the next release and the my own methods will be removed.
  171. Also the documentation is not really AutoDoc conform. This will be changed.
  172.  
  173. If anyone needs it: I may support reduction of bitmaps (to get an overview if
  174. you have very large pictures) with another attribute. Also I might add a extra
  175. method for setting a pixel directly into the picture.
  176.  
  177. Else I will mainly concentrate on removing bugs. The class itself does not
  178. need to be further extended (at least I have no ideas). The demo could support
  179. Datatypes for loading/saving images on V39+ systems. Also I would be possible
  180. to add a palette selector gadget so you can draw in different colours. Further
  181. expansions are up to you ;) (You can make a real WB paint program out of it
  182. if you want to - but if you decide to go Shareware I want a free Version!).
  183. Send me all you ideas/bugs (else I have no motivation to continue it).
  184.  
  185. Contacting:
  186. -----------
  187.  
  188. Send bugs, comments, ideas, flames to:
  189.  
  190. E-MAIL (preferred):
  191. -------------------
  192.  
  193.   suamor@student.uni-tuebingen.de
  194.   Reinhard_Udo.Katzmann@student.fh-reutlingen.de
  195.  
  196. SnailMail:
  197. ----------
  198.  
  199.   Reinhard Katzmann
  200.   Schellingstraße 41
  201.  
  202.   D - 72072 Tübingen
  203.  
  204. BBS'es
  205. ------
  206.  
  207. You can try to reach me through BBS'es near Tübingen. Some of the Sysops
  208. might know me or have contact to the Internet. I'm only User of one BBS:
  209.  
  210. Onkel Helmut's Hütte
  211.  
  212. Line 1: (0049) +7157/64546 (28800 Baud)
  213. Line 2: (0049) +7157/65428 (14400 Baud)
  214.  
  215. My usual Nickname on the internet or at this BBS is Suamor.
  216.